package com.example.day22.ex09;

public class MyStringDemo {
    public static void main(String[] args)
    {
        useMyString((s,x,y)->s.substring(x,y));
        useMyString(String::substring);
    }
    private static void useMyString(MyString my) {
        String s = my.mySubString("HelloWorld", 2, 5);
        System.out.println(s);
    }
}
